package cn.faster.common.enums;

/**
 * @author xiaoCoder
 * @version 1.0
 * @description:
 * @date 2021/8/12 14:38
 */
public enum ConstEnums {

    VERIFICATION_CODE_VERIFICATION("00002", "验证码失效"),
    VERIFICATION_CODE_ERROR("00003", "验证码错误"),
    VERIFIED_SUCCESSFULLY("00000", "验证码正确");

    private String key;
    private String value;

    ConstEnums(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }

    public Object getValueByKey(String key){
        for (ConstEnums valueEnum : ConstEnums.values()) {
            if (valueEnum.getKey().equals(key)){
                return valueEnum.getValue();
            }
        }
        return null;
    }

}
